/*
 * @Author: your name
 * @Date: 2021-10-28 22:18:44
 * @LastEditTime: 2021-12-19 22:55:54
 * @LastEditors: Please set LastEditors
 * @Description: 选择设置项管理类。
 * @FilePath: \phone\src\select_itemv2.h
 */
#ifndef SELECT_ITEMV2_H
#define SELECT_ITEMV2_H
#include "second_page.h"
#include "item.h"
#include "page_handle.h"
#include "interface.h"
using namespace std::placeholders;
class SelectItemV2 : public SecondPage, public Item
{
public:
    SelectItemV2();
    virtual ~SelectItemV2();
    void RefreshPage() override;
    void ResetKeyCmd(KeyCmdMapTable &keyEvent) override;
    std::string GetString() override;
    void ItemSelected() override;
    virtual void SelectFunc(void *ctx);
    void SaveData(void *ctx);
    /**
     * @brief Get the Tr Text Form Settings object
     * 获取设置项选择项的译文值，由派生类实现。
     * @param select 
     * @return std::string 
     */
    virtual std::string GetTrTextFormSettings(unsigned int select) { return "nullptr"; }
    void SetFuncAmount(unsigned int amount)
    {
        funcAmount = amount;
    }
    void SetSelectData(unsigned int data)
    {
        selectData = data;
    }
    unsigned int GetFuncAmount()
    {
        return funcAmount;
    }

// private:
    unsigned int selectData;
    unsigned int funcAmount;
};
#endif